home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / snpd1292.zip / INT2E.ASM < prev    next >
Assembly Source File  |  1992-12-26  |  2KB  |  56 lines

  1.         PAGE    55,132
  2.         .LIST
  3. ;
  4. ;       Interrupt 2Eh Call
  5. ;
  6. ;               From information originally published in
  7. ;               PC magazine, April 28, 1987. Requires
  8. ;               MASM 5.1 or later.
  9. ;
  10. ;               Adapted by Bob Stout.
  11. ;
  12. ;       NOTES:  INT 2Eh passes a formatted command line
  13. ;               directly to the resident portion of
  14. ;               COMMAND.COM for execution. It functions
  15. ;               similarly to the 'EXEC' function in DOS
  16. ;               but is generally quicker. This is an
  17. ;               undocumented DOS function and is subject
  18. ;               to change in future releases of DOS. It
  19. ;               also aborts any .BAT file which invokes
  20. ;               a program which uses it. Use with care!
  21. ;
  22. ;  Assemble with:       MASM /Mx /z ...
  23. ;                       TASM /jMASM /mx /z ...
  24. ;
  25.  
  26. %       .MODEL  memodel,C               ;Add model support via
  27.                                         ;command line macros, e.g.
  28.                                         ;MASM /Mx /Dmemodel=LARGE
  29.  
  30.         .CODE
  31.  
  32.         PUBLIC  _Int_2E
  33.  
  34. _Int_2E PROC    USES SI DI DS ES, command:PTR
  35.         Mov     CS:SaveSP,SP
  36.         Mov     CS:SaveSS,SS
  37.     IF @DataSize
  38.         Lds     SI,command
  39.     ELSE
  40.         Mov     SI,command
  41.     Endif
  42.  
  43.         Int     2Eh
  44.  
  45.         Mov     AX,CS:SaveSS
  46.         Mov     SS,AX
  47.         Mov     SP,CS:SaveSP
  48.         Ret
  49.  
  50. SaveSS  Dw      ?
  51. SaveSP  Dw      ?
  52.  
  53. _Int_2E ENDP
  54.  
  55.         End
  56.